package com.dp.decorator.exp02;

/**
 * @Author: Ruomeng
 * @Date: 2024/12/2
 * @Description : design-pattern
 * @Version: 1.0
 */
public class Client {

    public static void main(String[] args) {
        String info = "name:tom,age:23";
//        DataLoader loader = new BaseFileDataLoader("demo.txt");
//        loader.write(info);
//        String read = loader.read();
//        System.out.println(read);

        DataLoaderDecorator decorator = new EncryptionDataDecorator(new BaseFileDataLoader("demo2.txt"));
        //decorator.write(info);
        String read = decorator.read();
        System.out.println(read);
    }
}
